package com.cy.ppj.web.comm;

import com.cy.ppj.model.Result;
import com.cy.ppj.model.dto.dda.DdaGoodsDiligencingOrderInfoDTO;
import com.cy.ppj.service.dda.DdaService;
import com.cy.ppj.web.BaseController;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Description dda贷贷安系统对接api
 * @Author tanyilin
 * @Date 2019/8/27 15:58
 */
@Slf4j
@RestController
@RequestMapping("/gateway/dda")
@Api(tags = "dda贷贷安系统对接api")
public class DdaController extends BaseController {

    @Autowired
    private DdaService ddaService;

    @ApiOperation("查询 贷贷安 家具尽调订单详情信息")
    @GetMapping("/get/goodsDiligencing/detail")
    public Result<DdaGoodsDiligencingOrderInfoDTO> getGoodsDiligencingDetail(@RequestParam(value = "loanId") String loanId, @RequestParam(value = "orderId") Long orderId) {

        return ddaService.getDdaGoodsDiligencingOrderInfoDTO(loanId, orderId);
    }

    @ApiOperation("查询 贷贷安 家具尽调订单 申请资料")
    @GetMapping("/get/goodsDiligencing/apply/info")
    public Result getGoodsDiligencingApplyInfo(@RequestParam(value = "orderId") Long orderId, @RequestParam(value = "customerId") Long customerId) {

        return ddaService.getDdaGoodsDiligencingApplyInfo(orderId, customerId);
    }

}
